Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of d2s: Error400: Invalid parameter #5

Open
mfr69bs opened this issue Mar 28, 2023 · 4 comments
Open

Usage of d2s: Error400: Invalid parameter #5

mfr69bs opened this issue Mar 28, 2023 · 4 comments

Comments

@mfr69bs
Copy link

mfr69bs commented Mar 28, 2023

Hi,

thanks for the great plugin.

I want to get a list of all defined devices (API: "/api/my_app/devices/"). As i understand, the d2s attribute stands for it.

The doku has no further information how about to use it. If i write, e.g.
<phpipam d2s=1 />
i've got the following error:
Error400: Invalid parameter

How do i get this to work?

Best regards

@gilcot
Copy link
Owner

gilcot commented Mar 28, 2023

Hi,

The plugin is centred around IP addresses. So, there's no devices listing except from racks… For a given device, by it's index, you can retrieve attached hosts IP (did or deviceid) or subnets (d2s or d2n)

Having said that, does your requested index exist? I can't remember exactly where and how, but you should be able to found that information in one of the web pages. If it does, can you confirm that <phpipam did=1 /> works for you?

@mfr69bs
Copy link
Author

mfr69bs commented Mar 29, 2023

Hi,

Thanks for the fast respond. Ok I understand. I can confirm that did or deviceid works as described.

It's a pity that there is no list of devices. So I currently have ~300 MAC addresses to manage in my private network at home and would like to view it in my local wiki. ;)

But generally there is no link to the corresponding entry in phpmydmin in the lists. That would also be a good feature.

@gilcot
Copy link
Owner

gilcot commented Mar 29, 2023

Hi,

I have to admit that I never though about some lists (devices and others) alone.
Because all my needs were around subnets/addresses/racks listing. So it's a feature to add 😄 (but I can't promise any deadline for next release) unless one of the workarounds do the job for you.

  • If you've linked your devices to their enclosure, you can retrieve the devices list for each.
    E.g. <phpipam eid=10 /> will show tenth (index) rack.
    Same for <phpipam e2d=10 /> a synonym.
  • If you also linked enclosures to their locations, you can retrieve the devices list for each place.
    E.g. <phpipam l2e=4 /> will show racks at fourth (index) location.
  • If you don't use enclosures but directly link devices to their location, you can retrieve the devices list for each.
    E.g. <phpipam l2d=6 /> will show devices at sixth (index) location.
  • You can also retrieve the devices list of some device type if you put some efforts on that categorisation.
    E.g. <phpipam t2d=3 /> will show third (index) device type, supposing it's servers index whereas two is for switches etc.
  • You can also retrieve the list of devices that share the same enclosure as a given device.
    E.g. <phpipam d2e=7 /> will show devices in the same rack with seventh (index) device.
  • If you have some naming convention, maybe you can try to use the search.

Having said that, to see addresses used in your private network, I think you should look at subnet side instead of devices. Better check: sid/nid, net/cidr, s2n/s2s, f2n/f2s.

@mfr69bs
Copy link
Author

mfr69bs commented Mar 30, 2023

Thank you for your remarks. That was clear to me. Of course, this all makes sense, especially in relation to your use case.

Your focus is on the display of the IP addresses and racks. However, I have a different use case:
I only have one rack but a lot of devices distributed throughout the house. These are several NAS, multimedia devices, switches and Raspberry Pis. In total, arp-scan finds around 300 MAC addresses in 3 VLANs. In addition, there are the devices that are currently no longer in use or retired, which I also maintain in the phpipam device list. ;)

This certainly does not correspond to a "normal household". ;)

On the one hand I have settled my company at home and on the other hand I am active in the field of home automation. Here I am on the board and developer of an open source solution. This may explain the mass of devices in the private sector. ;)

Your plugin now links the IPAM and wiki. This corresponds exactly to my needs to connect entries from IPAM with other content (knowledge base, etc.) on pages of the wiki.

My idea was that I can display a list of all defined devices from phpipam in the Dokuwiki. Ideally, these also have a link to the corresponding device in phpipam.

The name of the device is linked and the columns IP address, Description, Rack, Type, Location, Vendor, Model, Serial, ... (similar to the device overview in phpipam) can optionally be displayed.

But I would also have liked a link to the corresponding entry in phpipam for the IP-based lists. The IP address is linked to the IP and the device is linked to it.

On the other side, i.e. in IPAM, I can then, for example, link an article about the device to the wiki via a user-defined attribute in the device list.

That was my hope when I installed the awesome plugin. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants