Skip to content

When removing graphs by command line, regex is not properly validated when empty #3224

@bmfmancini

Description

@bmfmancini

Hey Guys

This may be or bug or by design but if you run
php remove_graphs.php --graph-regex= --list
you will get a list of all of the devices in your install
Is there supposed to be an error displayed if the regex is null?

This is going to work great for me because I am in the middle of changing our data profile so I need to delete all of my graphs but I could see this being a danger if someone were to issue the force option and forget to add a regex value .....maybe...possibly ??

Here is the output from my test

[root@li1303-178 cli]# php remove_graphs.php --graph-regex= --list
There are 4 Graphs to Remove. Use the --force option to remove these Graphs.
ID GraphName
17 Local Linux Machine - Processes
18 Local Linux Machine - Load Average
19 Local Linux Machine - Logged in Users
20 Local Linux Machine - Memory Usage

[root@li1303-178 cli]# php remove_graphs.php --graph-regex= --force
There are 4 Graphs to Remove. Data Sources will be removed is possible.
[root@li1303-178 cli]#

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUndesired behaviourresolvedA fixed issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions